import React, { Component } from 'react'

// 使用react-redux时候
import {Provider} from 'react-redux'

import {default as CartList} from './CartList'

import store from '../../store'

export default class CartHander extends Component {
    render() {
        return (
            <>
                {/* 不使用react-redux时候 */}
               {/* <CartList storeCarts={this.props.store} />  */}
               {/* 使用react-redux时候  使用Provider包裹组件，传入一个store */}
                <Provider store={store}>
                    <CartList />
                </Provider>
            </>
        )
    }
}
